

import java.util.Scanner;

/*
 * @className HomeWorkTwo
 * @description:从键盘上录入一个1到5的数字;
 * @author admin
 * @date 2022/3/11 14:04
 * */
public class HomeWorkTwo {
    public static void main(String[] args) {
        System.out.println("请输入一个1到5的数字: ");
        int num = new Scanner(System.in).nextInt();

        switch (num) {
            case 1:
                System.out.println("新建");
                break;
            case 2:
                System.out.println("打开文件");
                break;
            case 3:
                System.out.println("保存");
                break;
            case 4:
                System.out.println("刷新");
                break;
            case 5:
                System.out.println("退出");
                System.exit(0);
            default:
                System.out.println("输入错误!");
        }
    }
}
